x86: Fix guest_physmap_add_entry checks
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 25 Sep 2008 09:26:08 +0000 (10:26 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 25 Sep 2008 09:26:08 +0000 (10:26 +0100)
commit933c704332789fa9c3955e7784dfb0ba40803679
treebb7d3d918900ab3af15589045de51786b86b57c8
parent876bb8d63988abd670aa94b786e7d50779683b3b
x86: Fix guest_physmap_add_entry checks

guest_physmap_add_entry() checks to see if the given mfn and gpfn
range in the p2m and m2p tables is already mapped before overwriting
the maps, and attempts to do something reasonable so that we don't
have any "dangling" pointers.

Unfortunately, these checks got broken when the page_order argument
was added.  Each individual p2m and m2p entry needs to be checked, not
just the first page in a page order.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/arch/x86/mm/p2m.c